// ********多个页面公用JS调用方法******//
// 单位转换
function transition(tw){
    if(100000000>tw && tw>=10000){
        tw=Math.round((tw/10000)*100)/100;
    }else if(tw>=100000000){
        tw=Math.round((tw/100000000)*100)/100;
    }
    return tw;
}
function unit(tw){
    var u="";
    if(100000000>tw && tw>=10000){
        tw=Math.round((tw/10000)*100)/100;
        u='万';
    }else if(tw>=100000000){
        tw=Math.round((tw/100000000)*100)/100;
        u='亿';
    }else{
        tw=tw;
    }
    return u;
}
function transitiony(ty){
        ty=Math.round((ty/100000000)*100)/100;
    return ty;
}

function transitiony2(ty){
    ty=Math.round((ty/100)*100)/100;
    return ty;
}

function swalConfirm(title,text,callback){
    swal({
        title: title,
        text: text,
        type: "warning",
        showCancelButton: true,
        confirmButtonColor: "#DD6B55",
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        closeOnConfirm: true
    },
    function(){
        if(callback){
            callback();
        }
    });
}